# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: knuxify <knuxify@gmail.com>
pkgname=blueman
pkgver=2.3.5
pkgrel=2
pkgdesc="GTK+ Bluetooth Manager"
url="https://github.com/blueman-project/blueman"
arch="all"
license="GPL-3.0-or-later"
depends="bluez dbus gtk+3.0 python3 py3-cairo py3-gobject3"
makedepends="
	bluez-dev
	cython
	glib-dev
	libtool
	polkit-dev
	python3-dev
	py3-gobject3-dev
	"
checkdepends="networkmanager libpulse-mainloop-glib"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-pyc"
source="https://github.com/blueman-project/blueman/releases/download/$pkgver/blueman-$pkgver.tar.xz
	dont-rerun-plugin-tests.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-schemas-compile
	make
}

check() {
	PYTHONPATH=module/.libs python3 -m unittest
}

package() {
	make DESTDIR="$pkgdir" install

	rm -rf "$pkgdir"/usr/lib/systemd
}

sha512sums="
678261dc0a795ca79b43614f4fc6ad436b44690d0ce4dbf15f55dba4834a25a5c1956bf658d568a3318828863b3bb089689d0dc4fef8963ed2b27cf0f1144580  blueman-2.3.5.tar.xz
a3ec5d05c0f32353c1eb933bf1acdcc1f8bede31c12132bd6b30adb46111ef88b7586f9f7c574a95b9dd4877f3977514389e2b565c1029835db920f30a01fb72  dont-rerun-plugin-tests.patch
"
